<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://displaytag.sf.net/el" prefix="display-el" %>
<%@ taglib uri="ford-arg/tags" prefix="ft" %>

<script language="javascript">
	function saveComments() {
		document.CommentsForm.action = "CommentsActionSave.do";
		document.CommentsForm.section.value = "save";
		document.CommentsForm.submit();
		if(window.opener.document.RequestsForm != null){
			window.opener.document.RequestsForm.action="RequestsActionFind.do";
			window.opener.document.RequestsForm.submit();
		}
		if(window.opener.document.AgreementsForm != null){
			window.opener.document.AgreementsForm.action="AgreementsActionFind.do";
			window.opener.document.AgreementsForm.submit();
		}
		window.close();	
	}
	
	function closeComments() {
		document.CommentsForm.section.value = "close";
		window.close();
	}
</script>

<table>
	<tr>
		<td colspan="2"><h2><bean:message key="label.comments"/></h2></td>
	</tr>
</table>

<html:form action="/CommentsActionInit">
<html:hidden property="section"/>
	<table>
		<tr>
			<td class="align_left" colspan="2">
				<html:textarea property="comments" rows="4" cols="40"></html:textarea>
			</td>		
		</tr>
		<tr>
			<td class="align_center">
				<html:button property="sav" onclick="saveComments()" styleClass="button"><bean:message key="label.save"/></html:button>
			</td>
			<td class="align_center">
				<html:button property="clos" onclick="closeComments()" styleClass="button"><bean:message key="request.label.close"/></html:button>
			</td>
		</tr>
	</table>
</html:form>
